package dk.pun.aot.client.event;

import com.google.gwt.event.shared.GwtEvent;

import dk.pun.aot.shared.character.CharacterId;

public class CharacterDeletedEvent extends GwtEvent<CharacterDeletedEventHandler> {

	public static Type<CharacterDeletedEventHandler> TYPE = new Type<CharacterDeletedEventHandler>();

	private final CharacterId characterId;

	public CharacterDeletedEvent(CharacterId characterId) {
		this.characterId = characterId;
	}

	public CharacterId getCharacterId() {
		return this.characterId;
	}

	@Override
	public Type<CharacterDeletedEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(CharacterDeletedEventHandler handler) {
		handler.onCharacterDeleted(this);
	}

}
